package com.example.tests;


public class ContactData implements Comparable<ContactData> {
	private String firstName;
	private String lastName;
	private String address;
	private String homeNumber;
	private String mobileNumber;
	private String workNumber;
	private String mail;
	private String mail2;
	private String birthDay;
	private String birthMonth;
	private String birthYear;
	private String group;
	private String secAddress;
	private String secHomeNumber;

	
	public ContactData() {
		
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
	//	result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
		return result;
	}




	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ContactData other = (ContactData) obj;
		if (lastName == null) {
			if (other.lastName != null)
				return false;
		} else if (!lastName.equals(other.lastName))
			return false;
		return true;
	}


	@Override
	public int compareTo(ContactData other) {
		return this.lastName.toLowerCase().compareTo(other.lastName.toLowerCase());
	}


	public ContactData withfirstName(String firstName) {
		this.firstName = firstName;
		return this;
	}


	public ContactData withlastName(String lastName) {
		this.lastName = lastName;
		return this;
	}


	public ContactData withaddress(String address) {
		this.address = address;
		return this;
	}


	public ContactData withhomeNumber(String homeNumber) {
		this.homeNumber = homeNumber;
		return this;
	}


	public ContactData withmobileNumber(String mobileNumber) {
		this.mobileNumber = mobileNumber;
		return this;
	}


	public ContactData withworkNumber(String workNumber) {
		this.workNumber = workNumber;
		return this;
	}


	public ContactData withmail(String mail) {
		this.mail = mail;
		return this;
	}


	public ContactData withmail2(String mail2) {
		this.mail2 = mail2;
		return this;
	}


	public ContactData withbirthDay(String birthDay) {
		this.birthDay = birthDay;
		return this;
	}


	public ContactData withbirthMonth(String birthMonth) {
		this.birthMonth = birthMonth;
		return this;
	}


	public ContactData withbirthYear(String birthYear) {
		this.birthYear = birthYear;
		return this;
	}


	public ContactData withgroup(String group) {
		this.group = group;
		return this;
	}


	public ContactData withsecAddress(String secAddress) {
		this.secAddress = secAddress;
		return this;
	}


	public ContactData withsecHomeNumber(String secHomeNumber) {
		this.secHomeNumber = secHomeNumber;
		return this;
	}


	public String getfirstName() {
	
		return firstName;
	}


	public String getlastName() {
		return lastName;
	}


	public String getaddress() {

		return address;
	}


	public String gethomeNumber() {
		return homeNumber;
	}


	public String getmobileNumber() {
		return mobileNumber;
	}


	public String getworkNumber() {
		
		return workNumber;
	}


	public String getmail() {
		return mail;
	}


	public String getmail2() {
	
		return mail2;
	}


	public String getbirthYear() {
		return birthYear;
	}


	public String getsecAddress() {

		return secAddress;
	}


	public String getsecHomeNumber() {
		return secHomeNumber;
	}


	public String getbirthDay() {
	
		return birthDay;
	}


	public String getbirthMonth() {
		
		return birthMonth;
	}
	
	
	
}